package vn.com.pavibook.model.vo;

import java.io.Serializable;

import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.web.multipart.commons.CommonsMultipartFile;

import vn.com.pavibook.domain.model.SupportNews;

@SuppressWarnings("serial")
public class SupportNewsVO implements Serializable {

	private Integer id;
	
	@NotEmpty(message = "Nhập thông tin")
	private String title;
	
	@NotEmpty(message = "Nhập thông tin")
	private String content;
	
	private int active;

	private String url_image;
	
	private CommonsMultipartFile fileSupportNewsUpload;
	
	public SupportNews convertToSupportNews(){
		SupportNews supportNews = new SupportNews();
		supportNews.setActive(active);
		supportNews.setId(id);
		supportNews.setContent(content);
		supportNews.setTitle(title);
		supportNews.setUrl_image(url_image);
		return supportNews;
	}
	
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public int getActive() {
		return active;
	}

	public void setActive(int active) {
		this.active = active;
	}

	public String getUrl_image() {
		return url_image;
	}

	public void setUrl_image(String url_image) {
		this.url_image = url_image;
	}

	public CommonsMultipartFile getFileSupportNewsUpload() {
		return fileSupportNewsUpload;
	}

	public void setFileSupportNewsUpload(CommonsMultipartFile fileSupportNewsUpload) {
		this.fileSupportNewsUpload = fileSupportNewsUpload;
	}

}
